import React from 'react'
import Sidebar from './components/Sidebar'
import Topbar from './components/Topbar'
import ThemeToggle from './contexts/ThemeToggle'

interface LayoutProps {
  children: React.ReactNode
}

const Layout: React.FC<LayoutProps> = ({ children }) => {
  return (
    <div className="min-h-screen">
      <ThemeToggle />
      <Sidebar />
      <Topbar />
      <div className="main-content pl-0">{children}</div>
      <footer className="text-center py-4 text-sm text-gray-500">
        <a
          href="https://beian.miit.gov.cn"
          target="_blank"
          rel="noopener noreferrer"
        >
          浙ICP备2025179781号 © 2025 七安的博客
        </a>
      </footer>
    </div>
  )
}

export default Layout
